import request from '@/utils/request'

// 查询合同范文订单列表
export function listTemplateMarketOrder(query) {
  return request({
    url: '/ec/templateMarketOrder/list',
    method: 'get',
    params: query
  })
}

// 查询合同范文订单详细
export function getTemplateMarketOrder(id) {
  return request({
    url: '/ec/templateMarketOrder/' + id,
    method: 'get'
  })
}

// 新增合同范文订单
export function addTemplateMarketOrder(data) {
  return request({
    url: '/ec/templateMarketOrder',
    method: 'post',
    data: data
  })
}

// 修改合同范文订单
export function updateTemplateMarketOrder(data) {
  return request({
    url: '/ec/templateMarketOrder',
    method: 'put',
    data: data
  })
}

// 删除合同范文订单
export function delTemplateMarketOrder(id) {
  return request({
    url: '/ec/templateMarketOrder/' + id,
    method: 'delete'
  })
}

// 查询合同范文收藏列表
export function getListPagerForEc(query) {
  return request({
    url: '/ec/templateMarketOrder/getPagerForEc',
    method: 'get',
    params: query
  })
}

// 查询范本订单信息
export function selectEcTemplateMarketOrder(data) {
  return request({
    url: '/ec/templateMarketOrder/selectEcTemplateMarketOrder',
    method: 'get',
    params: data
  })
}

// 账户余额支付-出证服务（企业专用）
export function accountBuyForCompany(data) {
  return request({
    url: '/ec/templateMarketOrder/accountBuyForCompany',
    method: 'post',
    params: data
  })
}

// 账户余额支付-出证服务（个人专用）
export function accountBuyForPerson(data) {
  return request({
    url: '/ec/templateMarketOrder/accountBuyForPerson',
    method: 'post',
    params: data
  })
}

// 碳能量兑换
export function integralExchange(data) {
  return request({
    url: '/ec/templateMarketOrder/integralExchange',
    method: 'post',
    params: data
  })
}


// 查询推荐范本
export function recommendList() {
  return request({
    url: '/ec/templateMarketOrder/recommendList',
    method: 'get'
  })
}
